package com.keepsport.keepsportapi.controller;
import com.keepsport.keepsportapi.service.intf.PalnService;
import com.keepsport.keepsportapi.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@CrossOrigin
@Api(tags = "课程信息查询")
@RestController
@RequestMapping("api/paln")
public class PalntablesController {
    @Resource
    private PalnService service;

    @GetMapping("type.do")
    @ApiOperation(value = "课程类型查询")
    private R query(int type){
        return service.selectByType(type);
    }
    @GetMapping("id.do")
    @ApiOperation(value = "课程详情查询")
    private R select(Integer id){
        return service.selectById(id);
    }
}
